package com.sen.patterns.creational.builder.ex2;

public class CarBuilder extends AutoBuilder {
	private Car car;
	
	public void buildBase() {
		System.out.println("CarBuilder-->buildBase()");
		car = new Car();
	}
	
	// 装配方法不一样
	public void addAutomobileItem(PartItem item) {
		System.out.println("CarBuilder-->addAutomobileItem()");
		car.add(item);
	}
	
	// 测试汽车方法
	public void testAutomobile() {
		System.out.println("CarBuilder-->checkAutomobileItem()");
	}
	
	// 返回装配好的汽车
	public Automobile getFinishedAutomobile() {
		System.out.println("CarBuilder-->getFinishedAutomobile()");
		return car;
	}
}
